package org.easiermock.invocationhandlers;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * An invocation handler that just throws an UnsupportedOperationException
 * 
 * @author Neil Fuller
 */
public class UnsupportedOperationInvocationHandler implements InvocationHandler {

	public static final UnsupportedOperationInvocationHandler INSTANCE = new UnsupportedOperationInvocationHandler();
	
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		throw new UnsupportedOperationException("method=[" + method + "] is not mocked");
	}

}
